Optimal. Leaf size=154 \[ \frac {C \tan ^{1+m}(c+d x) (b \tan (c+d x))^n}{d (1+m+n)}+\frac {(A-C) \, _2F_1\left (1,\frac {1}{2} (1+m+n);\frac {1}{2} (3+m+n);-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x) (b \tan (c+d x))^n}{d (1+m+n)}+\frac {B \, _2F_1\left (1,\frac {1}{2} (2+m+n);\frac {1}{2} (4+m+n);-\tan ^2(c+d x)\right ) \tan ^{2+m}(c+d x) (b \tan (c+d x))^n}{d (2+m+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {20, 3711, 3619,
3557, 371} \begin {gather*} \frac {(A-C) \tan ^{m+1}(c+d x) (b \tan (c+d x))^n \, _2F_1\left (1,\frac {1}{2} (m+n+1);\frac {1}{2} (m+n+3);-\tan ^2(c+d x)\right )}{d (m+n+1)}+\frac {B \tan ^{m+2}(c+d x) (b \tan (c+d x))^n \, _2F_1\left (1,\frac {1}{2} (m+n+2);\frac {1}{2} (m+n+4);-\tan ^2(c+d x)\right )}{d (m+n+2)}+\frac {C \tan ^{m+1}(c+d x) (b \tan (c+d x))^n}{d (m+n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 20
Rule 371
Rule 3557
Rule 3619
Rule 3711
Rubi steps
\begin {align*} \int \tan ^m(c+d x) (b \tan (c+d x))^n \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx &=\left (\tan ^{-n}(c+d x) (b \tan (c+d x))^n\right ) \int \tan ^{m+n}(c+d x) \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx\\ &=\frac {C \tan ^{1+m}(c+d x) (b \tan (c+d x))^n}{d (1+m+n)}+\left (\tan ^{-n}(c+d x) (b \tan (c+d x))^n\right ) \int \tan ^{m+n}(c+d x) (A-C+B \tan (c+d x)) \, dx\\ &=\frac {C \tan ^{1+m}(c+d x) (b \tan (c+d x))^n}{d (1+m+n)}+\left (B \tan ^{-n}(c+d x) (b \tan (c+d x))^n\right ) \int \tan ^{1+m+n}(c+d x) \, dx+\left ((A-C) \tan ^{-n}(c+d x) (b \tan (c+d x))^n\right ) \int \tan ^{m+n}(c+d x) \, dx\\ &=\frac {C \tan ^{1+m}(c+d x) (b \tan (c+d x))^n}{d (1+m+n)}+\frac {\left (B \tan ^{-n}(c+d x) (b \tan (c+d x))^n\right ) \text {Subst}\left (\int \frac {x^{1+m+n}}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left ((A-C) \tan ^{-n}(c+d x) (b \tan (c+d x))^n\right ) \text {Subst}\left (\int \frac {x^{m+n}}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {C \tan ^{1+m}(c+d x) (b \tan (c+d x))^n}{d (1+m+n)}+\frac {(A-C) \, _2F_1\left (1,\frac {1}{2} (1+m+n);\frac {1}{2} (3+m+n);-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x) (b \tan (c+d x))^n}{d (1+m+n)}+\frac {B \, _2F_1\left (1,\frac {1}{2} (2+m+n);\frac {1}{2} (4+m+n);-\tan ^2(c+d x)\right ) \tan ^{2+m}(c+d x) (b \tan (c+d x))^n}{d (2+m+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.27, size = 115, normalized size = 0.75 \begin {gather*} \frac {\tan ^{1+m}(c+d x) (b \tan (c+d x))^n \left (\frac {C}{1+m+n}+\frac {(A-C) \, _2F_1\left (1,\frac {1}{2} (1+m+n);\frac {1}{2} (3+m+n);-\tan ^2(c+d x)\right )}{1+m+n}+\frac {B \, _2F_1\left (1,\frac {1}{2} (2+m+n);\frac {1}{2} (4+m+n);-\tan ^2(c+d x)\right ) \tan (c+d x)}{2+m+n}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.50, size = 0, normalized size = 0.00 \[\int \left (\tan ^{m}\left (d x +c \right )\right ) \left (b \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )+C \left (\tan ^{2}\left (d x +c \right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \tan {\left (c + d x \right )}\right )^{n} \left (A + B \tan {\left (c + d x \right )} + C \tan ^{2}{\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {tan}\left (c+d\,x\right )}^m\,{\left (b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n\,\left (C\,{\mathrm {tan}\left (c+d\,x\right )}^2+B\,\mathrm {tan}\left (c+d\,x\right )+A\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________